package com.itheima01;

/**
 * @author Xiao
 * @date 2021/7/10
 */
public class AnimalTest {
    public static void main(String[] args) {
        Animal cat = new Cat("胖虎",2);
        Animal dog = new Dog();
        dog.setName("旺财");
        dog.setAge(3);
        cat.eat();
        cat.sleep();
        System.out.println("---------------");
        dog.eat();
        dog.sleep();
    }
}
